package com.ruoyi.app.controller.pay.controller;

import com.ruoyi.app.framework.base.BaseAppController;
import com.ruoyi.app.controller.pay.service.IPayService;
import com.ruoyi.common.annotation.PassToken;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api/wxRefund")
public class WxRefundController extends BaseAppController {

    @Autowired
    private IPayService payService;

    @PostMapping("/shopOrderRefundNotify")
    @PassToken
    public String shopOrderRefundNotify(HttpServletRequest request) {
        return payService.wxRefundNotifyHandle(request, "IShopOrderService");
    }

    @PostMapping("/shopOrderBackRefundNotify")
    @PassToken
    public String shopOrderBackRefundNotify(HttpServletRequest request) {
        return payService.wxRefundNotifyHandle(request, "IBusinessOrderService");
    }

    @PostMapping("/shopRechargeOrderBackRefundNotify")
    @PassToken
    public String shopRechargeOrderBackRefundNotify(HttpServletRequest request) {
        return payService.wxRefundNotifyHandle(request, "IMemberRechargeOrderService");
    }



}
